home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Archivers
/
S-Pack
/
S-Pack.doc
< prev
next >
Wrap
Text File
|
1996-09-26
|
16KB
|
381 lines
S - P A C K V1.4
S-PACK compresses and packs disks, HD partitions, drawers, and files into
as small a volume as possible. It can be used as an archiver, HD Backup, for
preparing files for data transmission, and anywhere space on disks needs to
be used economically.
CALLING S-PACK
WorkBench:
Click the icon.
CLI:
Enter "S-PACK", use RUN if you wish.
there are no switches or tool types required.
CREATING PACKS
When S-Pack is called a requester will appear. At the top are four mode
buttons, one for each of the available modes:
PACK:
Click if you are going to make a new Pack.
UNPACK:
Click if you want to unpack an existing Pack.
INDEX:
Click to extract the index from a Pack.
EXTRACT:
Click to extract a single file from a PACK.
Below these are four string gadgets. When a mode gadget is switched on
any string gadgets not required for that mode will be shaded.
FILES:
used in Pack and Extract.
Pack mode:
Either enter the disk, HD partition, drawer or file to be
packed, or if more convenient, create a text file which
lists the disks, partitions, drawers, and individual files
to be included. Partitions/disks must be terminated `:',
and each entry must be terminated by pressing the `RETURN'
key. An example of a list might be:
File: ram:paklist:
HD1:
df0:apples
df1:citrus/oranges
Enter the list file name into the requester preceded by
`LIST'. e.g LISTram:paklist.
Extract mode:
enter the file to be extracted . Filename should be
written as it appears in the index, however it is not
case-sensitive and the wildcard `?' is recognised.
Clicking the button just to the left of the gadget will bring up a file
requester if you have either Arp.library or ASL.library.
PACKFILE:
used in all modes.
Pack mode:
Enter drive, path and name for the pack; the programme will
add .PACK or .SE to the name that you enter here, according
to whether the Pack is self-unpacking or not. If a floppy
drive is called put a disk - normally empty - in the required
drive, and QUOTE THE DRIVE (eg df1:) and NOT the disk name.
Existing data on the disk will NOT be deleted.
Unpack/Index/Extract:
Enter the full name and path to the Pack,
INCLUDING ANY TERMINATING .PACK or .SE. If unpacking or
getting an index from floppies put the LAST disk of the pack
in whatever drive is designated.
A button is again provided for a file requester. The output may need to
be modified to ensure that floppies are referred to by DRIVE and not NAME
(for multi-disk packs).
TO:
used in Unpack, List and Extract
Unpack mode:
Destination for the unpacked files. Entry can be a
disk, HD partition or drawer. If a disk or HD partition you
must end with ":". If just a name is entered the program
will open a drawer of that name in the Current Directory,
and use that. Default destination is a drawer "Output"
opened in the current directory. If the destination is a
floppy it must be quted by DRIVE name, not disk name.
Index mode:
Enter filename and path for the extracted index. Default
is "RAM:List".
Extract mode:
Destination for the extracted file. May be a disk, HD
partition or drawer. Comments at Unpack mode above apply.
Default is "RAM:Extract"
A button is provided for a file requester. Again modify the output
if necessary to ensure that floppies are referred to by drive, not name.
TEMP FILES:
can be used in all modes.
When packing or unpacking heavy use is made of intermediate files,
by default opened in RAM:T. Where ram is limited it can be useful to
shuffle these temporary files off to a disk or HD partition. Enter the
required drive or partition here, terminating with ":". The programme
will add "T" to the drive and if necessary open the new drawer.
Below these string gadgets are four more buttons:
OK:
Accepts the entries and executes.
SE:
Used only when Packing. Adds a self-unpacking header (6600 bytes)
and turns the pack into an executable programme.
RECOMP:
Used only during Packing. If a file compressed with Power
Packer or the standard P-Compress code is encountered it will be
re-compressed using S-PACK's more efficient compressor (the same as
the SuperC option of P-Compress2). This will reduce the size of the
completed pack. On unpacking, such files will be decompressed and
not restored to their original state. This may be the normal option
if S-Pack is being used as an Archiver.
If RECOMP is NOT called the PACK will be a little larger, but on
unpacking such files will reappear in their original PP'd or P-
Compressed state. This will be the normal option for Backup packs.
CANCEL:
Clear any entries.
To quit, click the close gadget in the top left corner.
MULTIDISK operations.
Of necessity any programme used for backing up a hard disk must be
capable of filling and restoring multiple disks. With S-Pack multi-
disk archives can also be created (there is no fundamental difference
between a Pack made for HD Backup and one made for an Archive). During
Packing a requester will call for a new disk when the current one is
full - insert an empty disk, or if you want to end the operation click
"Abort". Insertion of a new disk will automatically be recognised.
During other operations specific disks (Disk[n], first disk, last disk)
may be called. Click "abort" or insert the required disk. During
unpacking the programme will call for a new disk if it finds that there
is insufficient space on the current disk for the file that is being
unpacked. (Calls for a new disk in a hard drive partition have to be
ignored and the operation aborted).
IF YOU WANT A MULTIDISK PACK TO HAVE AN ICON, YOU SHOULD PUT IT ON
THE FIRST DISK OF THE PACK BEFORE YOU START TO CREATE THE PACK
ITSELF. (Otherwise there may be no room for it).
Don't be in too much of a hurry when changing disks; It is vital to
wait for all disk activity to stop.
UNPACKING.
NON-SELF-UNPACKING PACKS:
Call S-pack, If the pack is on floppies put the LAST disk of the pack in
a floppy drive, click UNPACK and complete the requester. The programme
will first read the index, ask for the first disk, then start unpacking,
calling for new disks as necessary.
SELF-UNPACKING PACKS
A self-unpacking executable will have been produced if the SE button was
clicked when creating the pack, and can be identified by the .SE
termination. In effect the file on the first disk becomes an executable
and calls continuation data from the remaining disks.
To use an SE pack:
If the pack is on floppies, put the FIRST disk of the pack in any drive.
WORKBENCH:
Provide the file with a TOOL icon and set two ToolTypes:
DEST=<DESTINATION> Use upper-case, no gaps. Enter the drive or drawer
into which you want to unpack. Default is ram:X.
eg
DEST=DF0:
or
DEST=HD5:apples
A drawer "apples" will be opened if necessary.
TEMP=<TEMPDRIVE> Use upper-case, no gaps. Enter the drive to be
used for temporary files. Default is ram:. Do not
omit the `:'.
eg
TEMP=DF0:
Drawer DF0:T will be opened
CLI:
Call the filename. Include the terminating .SE if present. Two
switches are available matching the two tool-types above:
-d<DESTINATION> No gap between -d and drive, partition or drawer.
-t<TEMPDRIVE> No gap again. Must be a drive or HD partition, not a
drawer.
eg:
df2:HD5BackUp.SE -dHD5:apples -tHD4:
This would unpack the file "HD5BackUp.SE" to HD5:apples, using
HD4:T for temporary files. Note the colons in HD5 and HD4; they
must not be omitted.
Defaults are the same, ram:X for destination and ram: for temps.
If you type the name followed by `?', eg
df2:HDBackUp.SE ?
, a
Usage string "Usage: xxxx.SE -d<destination> -t<tempdrive>" will be
printed to the screen.
To otain the index for an SE pack, treat it like a non-SE pack - put the
last disk in a drive, call S-Pack, click LIST and complete the requester.
Single files cannot be extracted from an .SE pack.
FLOPPY DISKS
Disks are not re-formatted or re-named automatically, and the necessary
number should be cleared and numbered before you start a Pack. DO NOT
FORMAT TO THE "FAST FILE SYSTEM" - writing to an FFS disk is a lot slower
than to a normal disk! For reasonable writing speed call sys:c/Addbuffers
with as high a setting as you can afford; packing will be very slow if the
normal default figure of 5 is left unchanged. To ensure that follow-up
disks in multi-disk packs can be recognised always use the DRIVE (eg df0:)
not the diskNAME.
DIALOGUE
The output window will show the name of each file as it is packed or
unpacked.
During compression or decompression of large files the machine may be
quiet for some time. To indicate that work is in progress a dot will be
printed out at intervals.
SPEED.
For maximum speed:
The `ADDBUFFERS' setting should be as high as possible - desirably at
least 100 for any drive or partition used. This will of course benefit
all IO, not just S-Pack. Remember that each buffer costs you some 500
bytes of chip memory.
Use the Old File System, not FFS.
If memory is tight, reboot. This clears fragmentation and improves
speed by maximising the memory available.
Use RAM for the temporary files. (Use a floppy only as a last resort).
MEMORY CONTROL.
S-PACK can use a lot of memory. Consider the task of unpacking an .SE
pack containing a single file of compressed size 1Mbyte (on two disks),
expanding to 2Mbyte decompressed:
When the file is called the whole executable - on the first disk - is
loaded into memory like any other executable. typically 840 Kbytes
Then the two parts are assembled in a temporary file 1000 Kbytes
Next provision for decompression is made:
filesize(compressed) +130K 1130 Kbytes
If (for speed) you are unpacking to ram: add 2000 Kbytes
Total 4970 Kbytes
This can be reduced to some 1.14 Mbytes:
1. Reduce the size of the executable part (it must have at least the SE
header and the start of the first file to be included in the pack - say
8000 bytes) to a minimum by filling all but some 8000 bytes with rubbish
before creating the pack, then delete the rubbish. Saves 832 Kbytes.
2 Locate temporary files anywhere there is 1Mbyte to spare - a hard
disk partition. A floppy could be used for smaller files but would
slow operations considerably. Saves 1000 Kbytes
3. Pack/Unpack directly to the final destination. Saves 2000 Kbytes.
If these steps are taken (where relevant) calculate memory usage as:
Unpack
130K + largest file (compressed size).
Pack
300K + largest file (uncompressed size)
but allow as large a safety factor as you can to ensure that problems
with fragmented memory are avoided.
RECOVERY
One of the features of S-PACK is the ability to recover the bulk of data
even if one of the disks in the pack develops a fault. Disks prior to
the faulty one should unpack correctly.
First run the damaged disk through DISKSALV or a similar recovery
programme, and try to unpack again.
If still faulty, extract the index. This will always be possible if the
last disk is OK, and MAY be possible even if there is a fault on this disk.
Using the index and the EXTRACT option of S-PACK extract files from disks
following the faulty disk (non-SE packs only).
If the faulty disk can be read at all use the EXTRACT option to get as
many files from it as possible (non-SE packs only). Success will depend
on the precise nature of the fault.
Finally try to load the faulty disk into one of the programmes that
allow hex files to be read and written to, and allow the extraction of
sections of a file (HEX, BEAV, FILEMASTER). If the pack file on the disk
can be loaded, individual files can be extracted using this format data:
The format of each file is:
Marker:
FI (2 bytes)
serial number (2 bytes). Bit 15 will be set if the
file is not compressed.
Uncompressed file:
size (4 bytes)
data
To extract the file just copy the data section to a new file.
Compressed file:
uncompressed size (4 bytes)
compressed size (4 bytes)
crc (2 bytes)
data
To extract the file copy the whole to a new file and change the first
4 bytes (marker + serial number) from FIxx to HILH. You now have a file
which can be de-compressed by P-Compress2, or if a text can be read by
and saved in clear from the latest version of P-Reader. (V7.1).
Alternatively S-PACK the extracted file using the "RECOMP" option and
then unpack it.
Finally, even if the disk itself is damaged so severely that the PACK
file on it cannot be read as a file, it should still be possible to
extract sectors using Nic Wison's TRACKDOS and to reconstitute individual
files from these. This is not easy.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The compression code used is based on that used in Matthias Meixner's
SHRINK archiver, modified to improve speed. A large measure of the
credit for S-Pack's performance should be given to Matthias Meixner for
this extremely efficient code.
S-Pack is Freeware. It may be copied and distributed freely and used
without charge for non-commercial purposes. Authority for commercial
use should be obtained from the author below.
No responsibility can be accepted for any loss occasioned by use of the
programme.
Chas A. Wyndham,
1265 Canning Mills Road,
Roleystone,
WA 6111.
Australia